<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>校讯通管理平台</title>
		<link rel="shortcut icon" href="${basePath}/static/style/images/favicon.ico" type="image/x-icon" />
		<meta name="renderer" content="webkit" /><!-- 360浏览器默认选择webkit内核 -->
		<meta name="description" content="overview &amp; stats" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
		<script src='${basePath}/static/assets/js/jquery.js'></script>
		<!-- bootstrap & fontawesome -->
		<link rel="stylesheet" href="${basePath}/static/assets/css/bootstrap.css" />
		<link rel="stylesheet" href="${basePath}/static/assets/css/font-awesome.css" />
		<!-- page specific plugin styles -->
		<link rel="stylesheet" href="${basePath}/static/assets/css/jquery-ui.css" />
		<link rel="stylesheet" href="${basePath}/static/assets/css/datepicker.css" />
		<link rel="stylesheet" href="${basePath}/static/assets/css/ui.jqgrid.css" />		
		<!-- text fonts -->
		<link rel="stylesheet" href="${basePath}/static/assets/css/ace-fonts.css" />
		<link rel="stylesheet" href="${basePath}/static/style/css/sidebar.css" />
		<!-- ace styles -->
		<link rel="stylesheet" href="${basePath}/static/assets/css/ace.css" class="ace-main-stylesheet" id="main-ace-style" />
		<!-- ace settings handler -->
		<script src="${basePath}/static/assets/js/ace-extra.js"></script>
        <link rel="stylesheet" href="${basePath}/static/blade/css/blade-tab.css" type="text/css" media="screen" />
        <!-- <script src="${basePath}/static/blade/js/blade-tab.js"></script>	不使用多tab -->
        <script src="${basePath}/static/blade/js/blade-single-tab.js"></script>	<!-- layer -->
        <script src="${basePath}/static/layer/layer.js"></script>
        <script src="${basePath}/static/blade/js/blade-ajax.js" type="text/javascript" ></script>
	</head>

	<body class="no-skin">
		<!-- #section:basics/navbar.layout -->
		<div id="navbar" class="navbar navbar-default">
			<div class="navbar-container" id="navbar-container">
				<!-- #section:basics/sidebar.mobile.toggle -->
				<button type="button" class="navbar-toggle menu-toggler pull-left" id="menu-toggler" data-target="#sidebar">
					<span class="sr-only">Toggle sidebar</span>

					<span class="icon-bar"></span>

					<span class="icon-bar"></span>

					<span class="icon-bar"></span>
				</button>

				<!-- /section:basics/sidebar.mobile.toggle -->
				<div class="navbar-header pull-left">
					<!-- #section:basics/navbar.layout.brand -->
					<a href="#" class="navbar-brand">
						<small>
							<!-- <i class="fa  fa-tumblr"></i> -->
								校讯通管理平台
						</small>
					</a>
				</div>
				
				<div class="navbar-buttons navbar-header pull-right" role="navigation">
					<ul class="nav ace-nav">

						<li class="green dropdown-modal">
							<a href="#" onclick="doClick()">
								<i class="ace-icon fa fa-envelope icon-animated-vertical"></i>
								<span id="notice" class="badge badge-success"></span>
							</a>
						</li>

						<li class="light-blue dropdown-modal">
							<a data-toggle="dropdown" href="#" class="dropdown-toggle">
								<img class="nav-user-photo" src="${basePath}/static/assets/images/avatar5.png" alt="Jason's Photo" />
								<span class="user-info">
									<small>Welcome,</small>
									${shiro.getUser().name}
								</span>

								<i class="ace-icon fa fa-caret-down"></i>
							</a>

							<ul class="user-menu dropdown-menu-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">

								<li>
									<a href="javascript:editPassword();">
										<i class="ace-icon fa fa-user"></i>
										个人密码修改
									</a>
								</li>

								<li class="divider"></li>

								<li>
									<a href="javascript:logout();">
										<i class="ace-icon fa fa-power-off"></i>
										退出
									</a>
								</li>
							</ul>
						</li>
					</ul>
				</div>
			</div><!-- /.navbar-container -->
		</div>
<script>
$(function(){
	$.get('${basePath}/bizNotice/unRead',function(data){
		if(data.data>0){
			$("#notice").html(data.data);
		}
	});
});
//TODO 上线再开启
setInterval(function(){
	$.get('${basePath}/bizNotice/unRead',function(data){
		console.log(data);
		if(data.data>0){
			$("#notice").html(data.data);
		}else{
			$("#notice").html("");
		}
	});
}, 300000);

function doClick(){
	var obj = $("#sidebar_container a[data-addtabs='bizNotice']");
/* 	obj.parent("li").addClass("active");
	$("li.open a").trigger("click");
	$("a[data-title='校讯通管理']").parent("li").addClass("open"); */
	var url = obj.attr("data-url");
	var newUrl = url.replace("/bizNotice/","/bizNotice/receive/");
	console.log(newUrl);
	obj.attr("data-url",newUrl).trigger("click");
	obj.attr("data-url",url);
}
</script>